<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>与输入随机数比较大小</title>
	<script type="text/javascript">
	var n1=prompt("请输入数字");
	var n2=Math.floor(Math.random()*100);
	alert(n2);
	if(n2<n1){
		alert("U WIN");
	}
	else{
		alert("U LOSE");
	}
</script>
</head>
<body>
	
</body>
</html>